
class Animal{
    public String name;
    public int age;
    public void eat(){
        System.out.println(name+"正在吃饭！");
    }
}

class dog extends Animal{
    public int count;
    public void calling(){
        System.out.println(name+"在汪汪叫！！！");
    }
}

class cat extends Animal{
    public void calling(){
        System.out.println(name+"在喵喵叫！！！");
    }
}

public class test_11_10_0_3 {
    public static void main(String[] args) {
        dog d1=new dog();
        d1.name="二哈";
        d1.eat();
        d1.calling();

        cat c1=new cat();
        c1.name="汤姆";
        c1.eat();
        c1.calling();

    }

}



